Initiate a properties change on the specified host.
URL Parameters | |
---|---|
format | The format of the data in the request body. Can be
json or xml . If present, the format parameter
overrides the request Content-type header. |
Upon success, MarkLogic Server returns a status code 204 (No Content). If the payload is malformed or the host does not exist, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-admin
role, or the following
privilege: http://marklogic.com/xdmp/privileges/manage-admin
The data in the request body can contain one or more properties to modify. Set
bootstrap-host
to true
if it is to serve as the bootstrap host
for the cluster; otherwise set to false
. For details on the bootstrap host, see
Database Replication in MarkLogic Server in the Database Replication Guide.
The data in the request body has the following structure:
dynamic-host
host-name
group
bind-port
foreign-bind-port
zone
bootstrap-host
host-mode
host-mode-description
$ cat host-prop.xml ==> <host-properties xmlns="http://marklogic.com/manage"> <zone>my-new-zone</zone> </host-properties> $ curl --anyauth --user user:password -X PUT -d @./host-prop.xml \ -i -H "Content-type: application/xml" \ http://localhost:8002/manage/v2/hosts/my-host/properties ==> The zone property of host my-host is modified. MarkLogic Server returns headers similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5
$ cat host-prop.json ==> { "zone":"my-new-zone" } $ curl --anyauth --user user:password -X PUT -d @./host-prop.json \ -i -H "Content-type: application/json" \ http://localhost:8002/manage/v2/hosts/my-host/properties ==> The zone property of host my-host is modified. MarkLogic Server returns headers similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.